package chapter10.innerclass;

//成员内部类
public class MemberInnerClass {
    public static void main(String[] args) {
        Outer06 outer06 = new Outer06();
        outer06.f1();
//        第一种 方法
        Outer06.inner inner = outer06.new inner();
        inner.hi();
//        2.
        Outer06.inner inner1 = outer06.getInstance();

        System.out.println(inner == inner1);


    }

}

class Outer06 {
    private int n1 = 10;

    public class inner {
        void hi() {
            System.out.println("hihihi");
        }
    }

    void f1() {
        inner inner = new inner();
        inner.hi();
    }

    inner getInstance(){
        return new inner();
    }

}